home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Controls
/
Visual Basic Controls.iso
/
vbcontrol
/
newslist
/
FRMNEWSL.FRM
< prev
next >
Wrap
Text File
|
1998-09-27
|
9KB
|
279 lines
VERSION 5.00
Object = "{E2CE280B-255A-11D1-B2D1-E75DFE497A30}#11.0#0"; "NewsList.ocx"
Begin VB.Form frmNewsListDemo
Caption = "NewsList Demonstration"
ClientHeight = 4485
ClientLeft = 60
ClientTop = 345
ClientWidth = 7170
LinkTopic = "Form1"
ScaleHeight = 4485
ScaleWidth = 7170
StartUpPosition = 2 'CenterScreen
Begin VB.HScrollBar HScroll1
Height = 240
LargeChange = 1000
Left = 3570
SmallChange = 200
TabIndex = 11
TabStop = 0 'False
Top = 4170
Width = 3465
End
Begin VB.TextBox txtHeadline
Height = 285
Left = 4170
TabIndex = 5
Text = "txtHeadline"
Top = 555
Width = 2910
End
Begin VB.TextBox txtByline
Height = 285
Left = 4170
TabIndex = 7
Text = "txtByline"
Top = 1155
Width = 2910
End
Begin VB.TextBox txtBody
Height = 1350
Left = 4170
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 9
Text = "frmNewsListDemo.frx":0000
Top = 1770
Width = 2910
End
Begin VB.CommandButton cmdRemove
Caption = "&Remove"
Height = 345
Left = 60
TabIndex = 13
Top = 4080
Width = 1125
End
Begin VB.CommandButton cmdAdd
Caption = "&Add"
Height = 345
Left = 4170
TabIndex = 10
Top = 3210
Width = 2910
End
Begin VB.CheckBox chkPause
Caption = "&Pause"
Height = 285
Left = 90
TabIndex = 1
Top = 3675
Width = 885
End
Begin VB.CommandButton cmdBack
Caption = "< &Back"
Height = 345
Left = 1800
TabIndex = 2
Top = 3645
Width = 1125
End
Begin VB.CommandButton cmdNext
Caption = "&Next >"
Height = 345
Left = 2925
TabIndex = 3
Top = 3645
Width = 1125
End
Begin NewsListLib.NewsList NewsList1
Height = 3255
Left = 60
Top = 300
Width = 4005
_ExtentX = 7064
_ExtentY = 5741
AutoSize = 0 'False
Interval = 5000
BorderWidth = 2
BylineFooter = 3
HeadlineFooter = 0
BackColor = -2147483633
BorderStyle = 1
PaletteMode = 3
Palette = "frmNewsListDemo.frx":0008
Picture = "frmNewsListDemo.frx":0024
HeadlineColor = -2147483630
BeginProperty HeadlineFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 13.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BylineColor = -2147483630
BeginProperty BylineFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
BodyColor = -2147483630
BeginProperty BodyFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Headline1 = "NewsList ActiveX Control"
Byline1 = "by LDrive"
Body1 = $"frmNewsListDemo.frx":0040
Key1 = ""
ItemTag1 = ""
Headline2 = "NewsList NewsItems"
Byline2 = "NewsList ActiveX Control"
Body2 = $"frmNewsListDemo.frx":0110
Key2 = ""
ItemTag2 = ""
Headline3 = "NewsList Features"
Byline3 = "NewsList!"
Body3 = $"frmNewsListDemo.frx":021E
Key3 = ""
ItemTag3 = ""
Headline4 = "NewsList pricing"
Byline4 = "LDrive"
Body4 = $"frmNewsListDemo.frx":02BB
Key4 = ""
ItemTag4 = ""
NewsItemCount = 4
End
Begin VB.Label lblInterval
Caption = "Interval:"
Height = 240
Left = 1440
TabIndex = 12
Top = 4170
Width = 1425
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Bo&dy:"
Height = 195
Left = 4185
TabIndex = 8
Top = 1530
Width = 405
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "&Byline:"
Height = 195
Left = 4185
TabIndex = 6
Top = 915
Width = 465
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "&Headline:"
Height = 195
Left = 4185
TabIndex = 4
Top = 315
Width = 675
End
Begin VB.Label lblStatus
AutoSize = -1 'True
Caption = "Click on the control to pause the display."
Height = 195
Left = 90
TabIndex = 0
Top = 60
Width = 2865
End
End
Attribute VB_Name = "frmNewsListDemo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub chkPause_Click()
NewsList1.Pause = (chkPause.Value = vbChecked)
If chkPause.Value = vbChecked Then
lblStatus.Caption = "Paused. Click again to resume."
Else
lblStatus.Caption = "Running. Click to pause."
End If
End Sub
Private Sub cmdAdd_Click()
NewsList1.NewsItems.Add txtHeadline.Text, txtByline.Text, txtBody.Text
End Sub
Private Sub cmdBack_Click()
NewsList1.ShowPrevious
End Sub
Private Sub cmdNext_Click()
NewsList1.ShowNext
End Sub
Private Sub cmdRemove_Click()
Dim bPause As Boolean
bPause = NewsList1.Pause
NewsList1.Pause = True
If MsgBox("Are you sure you want to remove this item?", vbYesNo Or vbQuestion, App.Title) = vbYes Then
NewsList1.NewsItems.Remove NewsList1.CurrentNewsItem
End If
NewsList1.Pause = bPause
End Sub
Private Sub Form_Load()
chkPause.Value = (NewsList1.Pause And vbChecked)
HScroll1.Value = (NewsList1.Interval \ 2)
lblInterval.Caption = "Interval: " & NewsList1.Interval
End Sub
Private Sub HScroll1_Change()
NewsList1.Interval = CLng(HScroll1.Value) * 2
lblInterval.Caption = "Interval: " & NewsList1.Interval
End Sub
Private Sub HScroll1_Scroll()
NewsList1.Interval